home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / network / vbnets / vb-nets.bas < prev    next >
Encoding:
BASIC Source File  |  1994-10-11  |  2.0 KB  |  50 lines

  1. Option Explicit
  2.  
  3. ' Copyright ⌐ 1994 by Computer Technologies, Inc. All rights reserved.
  4.  
  5. ' MsgBox parameters
  6. Global Const MB_OK = 0                 ' OK button only
  7. Global Const MB_OKCANCEL = 1           ' OK and Cancel buttons
  8. Global Const MB_ABORTRETRYIGNORE = 2   ' Abort, Retry, and Ignore buttons
  9. Global Const MB_YESNOCANCEL = 3        ' Yes, No, and Cancel buttons
  10. Global Const MB_YESNO = 4              ' Yes and No buttons
  11. Global Const MB_RETRYCANCEL = 5        ' Retry and Cancel buttons
  12.  
  13. Global Const MB_ICONSTOP = 16          ' Critical message
  14. Global Const MB_ICONQUESTION = 32      ' Warning query
  15. Global Const MB_ICONEXCLAMATION = 48   ' Warning message
  16. Global Const MB_ICONINFORMATION = 64   ' Information message
  17.  
  18. Global Const MB_APPLMODAL = 0          ' Application Modal Message Box
  19. Global Const MB_DEFBUTTON1 = 0         ' First button is default
  20. Global Const MB_DEFBUTTON2 = 256       ' Second button is default
  21. Global Const MB_DEFBUTTON3 = 512       ' Third button is default
  22. Global Const MB_SYSTEMMODAL = 4096      'System Modal
  23.  
  24. ' MsgBox return values
  25. Global Const IDOK = 1                  ' OK button pressed
  26. Global Const IDCANCEL = 2              ' Cancel button pressed
  27. Global Const IDABORT = 3               ' Abort button pressed
  28. Global Const IDRETRY = 4               ' Retry button pressed
  29. Global Const IDIGNORE = 5              ' Ignore button pressed
  30. Global Const IDYES = 6                 ' Yes button pressed
  31. Global Const IDNO = 7                  ' No button pressed
  32.  
  33. Sub UT_CenterScreen (frmSubForm As Form)
  34.  
  35. ' Copyright ⌐ 1993, 1994 by Computer Technologies, Inc. All rights reserved.
  36.  
  37. ' This procedure centers a form on the screen. The form
  38. ' will be offset to just above center on the vertical axis.
  39.  
  40.     Dim nLeftPos      As Integer
  41.     Dim nTopPos       As Integer
  42.  
  43.     nLeftPos = (Screen.Width - frmSubForm.Width) / 2
  44.     nTopPos = (Screen.Height - frmSubForm.Height) / 2.4
  45.  
  46.     frmSubForm.Move nLeftPos, nTopPos
  47.  
  48. End Sub
  49.  
  50.